﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="ManageUsers2.aspx.cs" Inherits="Admin_Security_Users_ManageUsers2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link href="/Admin/css/WebAdminStyles.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table cellspacing="0" cellpadding="5" class="lrbBorders" width="750">
            <tr>
                <td class="callOutStyle">
                    <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:SearchForUsers %>" />
                </td>
            </tr>
            <tr>
                <td class="bodyTextLowTopPadding">
                    <asp:Label ID="Label1" runat="server" AssociatedControlID="SearchByDropDown" Text="<%$ Resources:SearchBy %>" />
                    <asp:DropDownList runat="server" ID="SearchByDropDown">
                        <%--<asp:ListItem runat="server" id="Item1" Text="<%$ Resources:Username %>" />
                        <asp:ListItem runat="server" id="Item2" Text="<%$ Resources:Email %>" />--%>
                    </asp:DropDownList>
                    <%-- &nbsp;&nbsp;<asp:Label ID="Label2" runat="server" AssociatedControlID="TextBox1"
                        Text="<%$ Resources:For %>" />
                    <asp:TextBox runat="server" ID="TextBox1" />--%>
                    <asp:Button ID="Button1" runat="server" Text="<%$ Resources:SearchFor %>" OnClick="Button1_Click" />
                    <br />
                    <asp:Label runat="server" ID="AlphabetInfo" Text="<%$ Resources:GlobalResources,AlphabetInfo %>" /><br />
                    <asp:Repeater runat="server" ID="AlphabetRepeater" OnItemCommand="RetrieveLetter">
                        <ItemTemplate>
                            <asp:LinkButton runat="server" ID="LinkButton12" CommandName="Display" CommandArgument="<%#Container.DataItem%>"
                                Text="<%#Container.DataItem%>" />
                            &nbsp;
                        </ItemTemplate>
                    </asp:Repeater>
                </td>
            </tr>
        </table>
        <br />
        <table cellspacing="0" cellpadding="0" border="0" id="hook" width="750">
            <tbody>
                <tr align="left" valign="top">
                    <td width="62%" height="100%" class="lbBorders">
                        <%--OnPageIndexChanging="IndexChanged"--%>
                        <asp:GridView runat="server" ID="DataGrid" Width="100%" CellSpacing="0" CellPadding="5"
                            border="0" AutoGenerateColumns="False" AllowPaging="true" PageSize="20" OnPageIndexChanging="IndexChanged"
                            UseAccessibleHeader="true">
                            <RowStyle CssClass="gridRowStyle" />
                            <AlternatingRowStyle CssClass="gridAlternatingRowStyle" />
                            <PagerStyle CssClass="gridPagerStyle" />
                            <PagerSettings Mode="Numeric" />
                            <HeaderStyle CssClass="callOutStyle" Font-Bold="true" />
                            <SelectedRowStyle CssClass="gridSelectedRowStyle" />
                            <Columns>
                                <%--<asp:TemplateField HeaderText="<%$ Resources:Active %>">
                                    <HeaderStyle HorizontalAlign="center" />
                                    <ItemStyle HorizontalAlign="center" />
                                    <ItemTemplate>
                                        <asp:CheckBox runat="server" ID="CheckBox2" OnCheckedChanged="EnabledChanged" AutoPostBack="true"
                                            Checked='<%#DataBinder.Eval(Container.DataItem, "IsApproved")%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>--%>
                                <asp:TemplateField runat="server" HeaderText="<%$ Resources:Username %>">
                                    <ItemTemplate>
                                        <asp:Label runat="server" ID="UserNameLink" ForeColor='black' Text='<%#Container.DataItem%>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <%--<asp:TemplateField runat="server">
                                    <ItemTemplate>
                                        <asp:LinkButton runat="server" ID="LinkButton12" Text="<%$ Resources:EditUser %>"
                                            CommandName="EditUser" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "UserName")%>'
                                            ForeColor="black" OnCommand="LinkButtonClick" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField runat="server">
                                    <ItemTemplate>
                                        <asp:LinkButton runat="server" ID="linkButton2" Text="<%$ Resources:DeleteUser%>"
                                            CommandName="DeleteUser" CommandArgument='<%#DataBinder.Eval(Container.DataItem, "UserName")%>'
                                            ForeColor="black" OnCommand="LinkButtonClick" OnClientClick="" />
                                    </ItemTemplate>
                                </asp:TemplateField>--%>
                                <asp:TemplateField runat="server">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="Linkbutton1" runat="server" CommandName="EditRoles" ForeColor='black'
                                            OnClick="ButtonClick" Text="<%$ Resources:EditRoles %>" CommandArgument='<%# Container.DataItem %>' />
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                        </asp:GridView>
                        <asp:Label runat="server" ID="noUsers" class="bodyTextNoPadding" EnableViewState="false"
                            Visible="false" Text="<%$ Resources:NoUsersCreated %>" />
                        <asp:Label runat="server" ID="notFoundUsers" class="bodyTextNoPadding" EnableViewState="false"
                            Visible="false" Text="<%$ Resources:NotFoundUsers %>" />
                    </td>
                    <td width="32%" height="100%">
                        <asp:PlaceHolder runat="server" ID="RolePlaceHolder">
                            <table borderwidth="1px" cellpadding="5" cellspacing="0" height="100%" width="100%">
                                <tr class="callOutStyle">
                                    <td valign="center">
                                        <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:Roles %>" />
                                    </td>
                                </tr>
                                <tr class="userDetailsWithFontSize" valign="top">
                                    <td class="lrbBorders" height="100%">
                                        <asp:MultiView runat="server" ID="multiView1" ActiveViewIndex="0">
                                            <asp:View runat="server" ID="view1">
                                            </asp:View>
                                            <asp:View runat="server" ID="view2">
                                                <asp:Label runat="server" ID="AddToRole" Text="<%$ Resources:AddToRoles %>" /><br />
                                                <asp:Repeater runat="server" ID="CheckBoxRepeater">
                                                    <ItemTemplate>
                                                        <asp:CheckBox runat="server" ID="CheckBox1" AutoPostBack="true" Text='<%# Container.DataItem.ToString()%>'
                                                            Checked='<%#UserIsRoles(Container.DataItem) %>' OnCheckedChanged="RoleMembershipChanged" />
                                                        <br />
                                                    </ItemTemplate>
                                                </asp:Repeater>
                                            </asp:View>
                                        </asp:MultiView>
                                    </td>
                                </tr>
                            </table>
                        </asp:PlaceHolder>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</asp:Content>
